<?php
namespace console\components\task;

use yii\base\BaseObject;

class TaskTimedManage extends BaseObject
{
    public $data;

    function init()
    {
        echo 'tasktimemanage***********************';
        parent::init();
        if (!empty($this->data['class']) && !empty($this->data['action'])) {
            $class_name = $this->data['class'];
            $action = $this->data['action'];
            if($this->data['is_static']){
                call_user_func([$class_name,$action],$this->data);
            }else{
                $mailObject = \Yii::createObject(['class' => $class_name::className()]);
                call_user_func([$mailObject,$action],$this->data);
            }

        }
    }
}
